package com.duty.UI;

import com.duty.UI.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

//This is the activity users use to select Alcohol/Tobacco button
public class ImportTypeActivity extends Activity {

	private String province;
    
	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.select);
        
        //retrieve province from last activity
        Bundle extras = getIntent().getExtras();
        province = extras.getString("province");
               
		Button btnAlcohol = (Button) findViewById(R.id.btnAlcohol);
		btnAlcohol.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View component) {
				// go to the select alc/tobacco page
				Intent alcohol = new Intent(ImportTypeActivity.this, AlcoholActivity.class);
				alcohol.putExtra("province", province);
				startActivity(alcohol);
			}
		});
		
		Button btnTobacco = (Button) findViewById(R.id.btnTobacco);
		btnTobacco.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View component) {
				// go to the select alc/tobacco page
				Intent tobacco = new Intent(ImportTypeActivity.this, TobaccoActivity.class);
				tobacco.putExtra("province", province);
				startActivity(tobacco);
			}
		});
        
        
        
    }
	
}

